﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace HostS1
{
    class Program
    {
        static void Main(string[] args)
        {

            Uri baseUri = new Uri("http://localhost/Servicio1");

            ServiceHost host = new ServiceHost(typeof(Servicios01.Service1), new Uri[] { baseUri });
            host.AddServiceEndpoint(typeof(Servicios01.IService1), new WSHttpBinding(), "");
            System.ServiceModel.Description.ServiceMetadataBehavior smb = new System.ServiceModel.Description.ServiceMetadataBehavior();
            smb.HttpGetEnabled = true;

            System.ServiceModel.Description.ServiceDebugBehavior sdb = new System.ServiceModel.Description.ServiceDebugBehavior();
          //  sdb.IncludeExceptionDetailInFaults = true;


            host.Description.Behaviors.Add(smb);
            

            host.Open();

            Console.WriteLine("Listo!!");
            Console.ReadLine();
        }
    }
}
